import * as sdk from './fetch';

/**
 *
 * 获得微信sign
 *
 */
async function getOpenMemberList(request: IGetSignRequestReq): Promise<TicketResponse> {
  let result = await sdk.post<TicketResponse>('/customerpurchasecardrecord/page', {
    ...request,
  });
  return result.context;
}

export default {
  getOpenMemberList,
};

/**
 * 内容
 */
export interface TicketResponse {
  /**
   * appId
   */
  appId?: string;
  /**
   * 字符串
   */
  nonceStr?: string;
  /**
   * 加密信息
   */
  signature?: string;
  /**
   * 时间戳
   */
  timestamp?: string;
  /**
   * url
   */
  url?: string;
  [k: string]: any;
}

/**
 * This interface was referenced by `IgnoreType`'s JSON-Schema
 * via the `definition` "IGetSignRequestReq".
 */
export interface IGetSignRequestReq {
  url?: string;
  [k: string]: any;
}

//create by moon https://github.com/creasy2010/moon
